package TG_1111;

public class Solution {
	public int[] maxDepthAfterSplit(String seq) {
		int[] ans = new int[seq.length()];
		int depth = 0;
		int index = 0;
		for (char c : seq.toCharArray()) {
			if (c == '(') {
				depth++;
				ans[index++] = depth % 2;
			}
			if (c == ')') {
				ans[index++] = depth % 2;
				depth--;
			}
		}
		return ans;

	}
}
